//
//  TDQuadCurveMenuItem.h
//  iosf
//
//  Created by Ye Yuan on 12-4-2.
//  Copyright (c) 2012年 Neusoft Corporation. All rights reserved.
//  

#import <UIKit/UIKit.h>

@protocol TDQuadCurveMenuItemDelegate;

@interface TDQuadCurveMenuItem : UIImageView
{
    UIImageView *_contentImageView;
    CGPoint _startPoint;
    CGPoint _endPoint;
    CGPoint _nearPoint; // near
    CGPoint _farPoint; // far
    
    id<TDQuadCurveMenuItemDelegate> _delegate;
}

@property (nonatomic, retain, readonly) UIImageView *contentImageView;

@property (nonatomic) CGPoint startPoint;
@property (nonatomic) CGPoint endPoint;
@property (nonatomic) CGPoint nearPoint;
@property (nonatomic) CGPoint farPoint;

@property (nonatomic, assign) id<TDQuadCurveMenuItemDelegate> delegate;

- (id)initWithImage:(UIImage *)img 
   highlightedImage:(UIImage *)himg
       ContentImage:(UIImage *)cimg
highlightedContentImage:(UIImage *)hcimg;


@end

@protocol TDQuadCurveMenuItemDelegate <NSObject>
- (void)quadCurveMenuItemTouchesBegan:(TDQuadCurveMenuItem *)item;
- (void)quadCurveMenuItemTouchesEnd:(TDQuadCurveMenuItem *)item;
@end